import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

//游戏上下文对象
//不让此脚本拖动挂到任何节点上
// @ccclass('Game')
export class GameCtx extends Component {
    public static instance: GameCtx=null;

    protected onLoad(): void {
        if(GameCtx.instance===null) {
            GameCtx.instance=this;
        }else{
            this.destroy();
        }
    }

    public gameStart(): void {
        //游戏启动流程
        console.log('game start');
    }
}


